package com.zky.gulimall.search.feign;

import com.zky.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Description 商品feign
 * @Author 张开源
 * @Date 2022/11/15 18:22
 * @Version 1.0
 **/
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 根据attrId获取attr信息
     *
     * @param attrId
     * @return
     */
    @GetMapping("/product/attr/info/{attrId}")
    R getAttrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 品牌信息
     */
    @GetMapping("/product/brand/infos")
    R brandInfos(@RequestParam("brandIds") List<Long> brandIds);
}
